# 添加函数，动态获取令牌数据
from api.ihrm_login_api import IhrmLogin


# 调用此函数，就能获取到 Bearer令牌
def get_header():
    json_data = {"mobile": "13800000002", "password": "123456"}

    resp = IhrmLogin.login(json_data)

    token = "Bearer " + resp.json().get("data")

    header = {"Authorization": token}

    return header


if __name__ == '__main__':
    get_header()
